import {reqTopList} from '@/api'
const state = {
    topList:[]
}

const mutations = {
    TOPLIST(state, topList){
        state.topList = topList
    }
}

const actions = {
    async topList({commit}){
        let result = await reqTopList()
        if(result.code == 200){
            commit("TOPLIST", result.list)
        }
    },
}

const getters = {}

export default {
    state,
    mutations,
    actions,
    getters
}